package com.gujiangbo.chapter06;

import org.apache.commons.lang3.JavaVersion;

/**
 * @Author: gujiangbo.co
 * @Contact: 646832012@qq.com
 * @Date: 2022/3/30 22:15
 * @Version: 1.0
 * @Description: 逃逸分析
 * 开启逃逸分析
 * -XX:+DoEscapeAnalysis
 * 查看逃逸分析的筛选结果
 * -XX:+PrintEscapeAnalysis
 */
public class JavaEscapeAnalysis {

    public static void main(String[] args) {
        getMessage("逃逸分析~");
        cpls(12, 34);
    }

    public static String getMessage(String info) {
        return JavaVersion.JAVA_1_8 + " " + info;
    }

    public static void cpls(int i, int j) {
        System.out.println(i + j);
    }
}
